package com.tuo51.childcare.domain.vo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 用来给任务模板配置用的元数据
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DailyTaskTemplateMeta implements Serializable {

    /*几天几次*/
    private Integer times;

    /*周期几天*/
    private Integer perDay;

    /*一共持续多少天*/
    private Integer durationDays;

    private String comment;

    public static DailyTaskTemplateMeta dayPerMonth(Integer month){
        DailyTaskTemplateMeta ret = new DailyTaskTemplateMeta();

        ret.times = 1;
        ret.perDay = 1;
        ret.durationDays = 31 * month;
        ret.comment = "每天一次连续一个月";

        return ret;
    }

}
